package Chapter06.Homework;
//定义一个整数数组，输出比平均值大的数
public class Test06 {
    public static void main(String[] args) {
        int[] num=new int[]{1,8,45,33,22,67,89};
        int sum=0;
        for (int i=0;i<num.length;i++){
            sum+=num[i];
        }
        sum=sum/num.length;
        System.out.print("比平均值大的数:");
        for (int i=0;i<num.length;i++){
            if(num[i]>sum){
                System.out.print(num[i]+" ");
            }
        }
    }
}
